package com.shop.entity;

import java.util.Objects;

public class Comment {
    private int c_id;            //���۱�id
    private String c_starttime;  //����ʱ��
    private String c_content;    //��������
    private int u_id;            //�û�id
    private int gd_id;           //��Ʒ����id

    public int getC_id() {
        return c_id;
    }

    public void setC_id(int c_id) {
        this.c_id = c_id;
    }

    public String getC_starttime() {
        return c_starttime;
    }

    public void setC_starttime(String c_starttime) {
        this.c_starttime = c_starttime;
    }

    public String getC_content() {
        return c_content;
    }

    public void setC_content(String c_content) {
        this.c_content = c_content;
    }

    public int getU_id() {
        return u_id;
    }

    public void setU_id(int u_id) {
        this.u_id = u_id;
    }

    public int getGd_id() {
        return gd_id;
    }

    public void setGd_id(int gd_id) {
        this.gd_id = gd_id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Comment comment = (Comment) o;
        return c_id == comment.c_id &&
                u_id == comment.u_id &&
                gd_id == comment.gd_id &&
                Objects.equals(c_starttime, comment.c_starttime) &&
                Objects.equals(c_content, comment.c_content);
    }

    @Override
    public int hashCode() {
        return Objects.hash(c_id, c_starttime, c_content, u_id, gd_id);
    }

    @Override
    public String toString() {
        return "Comment{" +
                "c_id=" + c_id +
                ", c_starttime='" + c_starttime + '\'' +
                ", c_content='" + c_content + '\'' +
                ", u_id=" + u_id +
                ", gd_id=" + gd_id +
                '}';
    }

    public Comment(int c_id, String c_starttime, String c_content, int u_id, int gd_id) {
        this.c_id = c_id;
        this.c_starttime = c_starttime;
        this.c_content = c_content;
        this.u_id = u_id;
        this.gd_id = gd_id;
    }

    public Comment() {

    }
}
